package hos.task;

import android.util.Pair;

import java.util.Map;

/**
 * <p>Title: Auto </p>
 * <p>Description:  </p>
 * <p>Company: www.mapuni.com </p>
 *
 * @author : 蔡俊峰
 * @version : 1.0
 * @date : 2023-02-03 10:51
 */
public interface Auto {

        interface Convert<T,F> {
            F convert(T t);
    }
    interface Refresh {
        void refresh();
    }

    interface AutoPaging<T> {
        Object run(PagingRefresh<T> refresh);

        void changed(PagingRefresh<T> refresh);
    }

    interface AutoRefresh {
        void autoRefresh(Object... obj);
    }

    interface AutoLoadMore {
        void autoLoadMore(Object... obj);
    }

    interface AutoRefreshThread {
        void autoRefreshThread(Object... obj);
    }

    interface AutoLoadMoreThread {
        void autoLoadMoreThread(Object... obj);
    }

    interface AutoRefreshMap {
        void autoRefresh(Map<String, Object> map);
    }

    interface AutoLoadMoreMap {
        void autoLoadMore(Map<String, Object> map);
    }

    interface AutoRefreshMapThread {
        void autoRefreshThread(Map<String, Object> map);
    }

    interface AutoLoadMoreMapThread {
        void autoLoadMoreThread(Map<String, Object> map);
    }

    @SuppressWarnings("unchecked")
    interface AutoRefreshPair {
        void autoRefresh(Pair<String, Object>... pairs);
    }

    @SuppressWarnings("unchecked")
    interface AutoLoadMorePair {
        void autoLoadMore(Pair<String, Object>... pairs);
    }

    @SuppressWarnings("unchecked")
    interface AutoRefreshPairThread {
        void autoRefreshThread(Pair<String, Object>... pairs);
    }

    @SuppressWarnings("unchecked")
    interface AutoLoadMorePairThread {
        void autoLoadMoreThread(Pair<String, Object>... pairs);
    }
}
